/*
 * Decompiled with CFR 0.150.
 * 
 * Could not load the following classes:
 *  cn.hutool.core.date.DateUtil
 *  cn.hutool.core.util.ObjectUtil
 *  cn.hutool.core.util.StrUtil
 *  com.alibaba.fastjson.JSON
 *  de.felixroske.jfxsupport.FXMLController
 *  javafx.application.Platform
 *  javafx.collections.FXCollections
 *  javafx.collections.ObservableList
 *  javafx.event.EventHandler
 *  javafx.fxml.FXML
 *  javafx.fxml.Initializable
 *  javafx.scene.Node
 *  javafx.scene.control.Alert
 *  javafx.scene.control.Alert$AlertType
 *  javafx.scene.control.Button
 *  javafx.scene.control.CheckBox
 *  javafx.scene.control.ComboBox
 *  javafx.scene.control.TableCell
 *  javafx.scene.control.TableColumn
 *  javafx.scene.control.TableView
 *  javafx.scene.control.TextField
 *  javafx.scene.control.cell.PropertyValueFactory
 *  javafx.scene.image.Image
 *  javafx.scene.image.ImageView
 *  javafx.scene.layout.Pane
 *  javafx.stage.Modality
 *  javafx.stage.Stage
 *  javafx.stage.WindowEvent
 *  javafx.util.Callback
 *  javafx.util.StringConverter
 *  org.springframework.beans.factory.annotation.Autowired
 *  org.springframework.util.CollectionUtils
 */
package com.gys.controller.saleRecipel;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.gys.GysApplication;
import com.gys.common.business.GysUtil;
import com.gys.common.business.RemoteAuditUtil;
import com.gys.common.data.GetFileOutData;
import com.gys.common.data.HttpJson;
import com.gys.common.util.CacheUtil;
import com.gys.common.util.CommonUtil;
import com.gys.common.util.SpringUtil;
import com.gys.controller.BaseController;
import com.gys.controller.index.IndexController;
import com.gys.controller.saleRecipel.SaleRecipelRecordController;
import com.gys.controller.salesReceipts.RecipelDrugsController;
import com.gys.controller.salesReceipts.SalesReceiptsMainController;
import com.gys.controller.salesReceipts.SelectRecipelDrugsController;
import com.gys.data.deviceCheck.GsdcStatus;
import com.gys.data.example.GetUserOutData;
import com.gys.data.remoteAudit.RemoteAuditDInData;
import com.gys.data.remoteAudit.RemoteAuditHInData;
import com.gys.data.saleRecipel.GaiaSdSaleRecipelRecordOutData;
import com.gys.data.salesReceipts.GetQueryMemberOutData;
import com.gys.view.saleRecipel.RemoteAuditlView;
import com.gys.view.salesReceipts.SelectRecipelDrugsView;
import de.felixroske.jfxsupport.FXMLController;
import java.io.File;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.ResourceBundle;
import java.util.Timer;
import java.util.TimerTask;
import javafx.application.Platform;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.Node;
import javafx.scene.control.Alert;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.ComboBox;
import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.TextField;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.Pane;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.stage.WindowEvent;
import javafx.util.Callback;
import javafx.util.StringConverter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;

@FXMLController
public class RemoteAuditController
extends BaseController
implements Initializable {
    @Autowired
    private SaleRecipelRecordController saleRecipelRecordController;
    private ObservableList<GaiaSdSaleRecipelRecordOutData> observableTableList = FXCollections.observableArrayList(new ArrayList());
    @FXML
    private Pane modelPane;
    @FXML
    private Button uploadAuditBtn;
    @FXML
    private Button cancelBtn;
    @FXML
    private TextField inpGssrCustName;
    @FXML
    private ComboBox<GsdcStatus> inpGssrCustSex;
    @FXML
    private TextField inpGssrCustMobile;
    @FXML
    private TextField inpGssrCustAge;
    @FXML
    private TextField inpGssrCustIdcard;
    @FXML
    private TextField inpGssrEmp;
    @FXML
    private TextField inpGssrDate;
    @FXML
    private TextField inpGssrTime;
    @FXML
    private ImageView imgView;
    @FXML
    private TableColumn<GaiaSdSaleRecipelRecordOutData, String> index;
    @FXML
    private TableColumn<GaiaSdSaleRecipelRecordOutData, CheckBox> recipelRecordOutDataCheckBox;
    @FXML
    private TableColumn<GaiaSdSaleRecipelRecordOutData, String> proCode;
    @FXML
    private TableColumn<GaiaSdSaleRecipelRecordOutData, String> proCommonname;
    @FXML
    private TableColumn<GaiaSdSaleRecipelRecordOutData, String> proSpecs;
    @FXML
    private TableColumn<GaiaSdSaleRecipelRecordOutData, String> proUnit;
    @FXML
    private TableColumn<GaiaSdSaleRecipelRecordOutData, String> gssdBatch;
    @FXML
    private TableColumn<GaiaSdSaleRecipelRecordOutData, String> gssdQty;
    @FXML
    private TableView<GaiaSdSaleRecipelRecordOutData> tableView;
    @FXML
    private ImageView imageUrl;
    @Autowired
    private IndexController indexController;
    @Autowired
    private SelectRecipelDrugsController selectRecipelDrugsController;
    @Autowired
    private SalesReceiptsMainController salesReceiptsMainController;
    @Autowired
    private RecipelDrugsController recipelDrugsController;
    public List<GaiaSdSaleRecipelRecordOutData> dataList = new ArrayList<GaiaSdSaleRecipelRecordOutData>();
    public String numTh = "";
    public String image = "";

    public void initialize(URL location, ResourceBundle resources) {
        this.inpGssrCustSex.getItems().addAll(this.getAllStatus());
        this.inpGssrCustSex.converterProperty().set(new StringConverter<GsdcStatus>(){

            public String toString(GsdcStatus object) {
                return object.getName();
            }

            public GsdcStatus fromString(String string) {
                return null;
            }
        });
        CommonUtil.initIcon(RemoteAuditlView.class);
        this.init();
    }

    @Override
    public void init() {
        if (ObjectUtil.isEmpty(this.modelPane)) {
            return;
        }
        Platform.runLater((Runnable)new Runnable(){

            @Override
            public void run() {
                RemoteAuditlView view = SpringUtil.getBean(RemoteAuditlView.class);
                Stage stage = (Stage)view.getView().getScene().getWindow();
                stage.setTitle("\u4e0a\u4f20\u5ba1\u65b9" + RemoteAuditController.this.numTh);
            }
        });
        this.ininFrom();
        this.initResource();
        new Timer().schedule(new TimerTask(){

            @Override
            public void run() {
                RemoteAuditlView view = SpringUtil.getBean(RemoteAuditlView.class);
                Stage stage = (Stage)view.getView().getScene().getWindow();
                stage.setOnCloseRequest((EventHandler)new EventHandler<WindowEvent>(){

                    public void handle(WindowEvent event) {
                        RemoteAuditController.this.numTh = "";
                    }
                });
            }
        }, 1000L);
    }

    void ininFrom() {
        this.inpGssrCustName.clear();
        this.inpGssrCustSex.setValue(null);
        this.inpGssrCustMobile.clear();
        this.inpGssrCustAge.clear();
        this.inpGssrCustIdcard.clear();
        this.imgView.setImage(null);
        this.tableView.setItems(null);
        this.imageUrl.setImage(null);
    }

    private void initResource() {
        this.initTable();
        GaiaSdSaleRecipelRecordOutData outData = (GaiaSdSaleRecipelRecordOutData)this.observableTableList.get(0);
        this.inpGssrCustName.setText(outData.getGssrCustName());
        this.inpGssrCustSex.setValue(new GsdcStatus("\u7537".equals(outData.getGssrCustSex()) ? "1" : "2", outData.getGssrCustSex()));
        this.inpGssrCustMobile.setText(outData.getGssrCustMobile());
        this.inpGssrCustAge.setText(outData.getGssrCustAge());
        this.inpGssrCustIdcard.setText(outData.getGssrCustIdcard());
        this.inpGssrEmp.setText(((GetUserOutData)CacheUtil.get("logInUser")).getLoginName());
        this.inpGssrDate.setText(DateUtil.format((Date)new Date(), (String)"yyyyMMdd"));
        this.inpGssrTime.setText(DateUtil.format((Date)new Date(), (String)"HHmmss"));
    }

    public TableView<GaiaSdSaleRecipelRecordOutData> initTable() {
        this.observableTableList.clear();
        this.observableTableList = FXCollections.observableArrayList(this.dataList);
        this.bingTableCell();
        this.tableView.setItems(this.observableTableList);
        return this.tableView;
    }

    private void bingTableCell() {
        this.index.setCellValueFactory((Callback)new PropertyValueFactory(this.index.getId()));
        this.recipelRecordOutDataCheckBox.setCellValueFactory(cellData -> ((GaiaSdSaleRecipelRecordOutData)cellData.getValue()).getRecipelRecordOutDataCheckBox().getCustomCheckBox());
        this.recipelRecordOutDataCheckBox.setCellFactory(col -> {
            TableCell<GaiaSdSaleRecipelRecordOutData, CheckBox> cell = new TableCell<GaiaSdSaleRecipelRecordOutData, CheckBox>(){

                protected void updateItem(CheckBox item, boolean empty) {
                    super.updateItem(item, empty);
                    this.setGraphic((Node)item);
                    if (item != null) {
                        item.setOnMouseClicked(col -> {
                            if (CollectionUtils.isEmpty((Collection)RemoteAuditController.this.observableTableList)) {
                                return;
                            }
                            int index = this.getIndex();
                            for (int i = 0; i < RemoteAuditController.this.observableTableList.size(); ++i) {
                                if (i == index) continue;
                                ((GaiaSdSaleRecipelRecordOutData)RemoteAuditController.this.observableTableList.get(i)).getRecipelRecordOutDataCheckBox().setSelectStatus(false);
                            }
                        });
                    }
                }
            };
            return cell;
        });
        this.proCode.setCellValueFactory((Callback)new PropertyValueFactory(this.proCode.getId()));
        this.proCommonname.setCellValueFactory((Callback)new PropertyValueFactory(this.proCommonname.getId()));
        this.proSpecs.setCellValueFactory((Callback)new PropertyValueFactory(this.proSpecs.getId()));
        this.proUnit.setCellValueFactory((Callback)new PropertyValueFactory(this.proUnit.getId()));
        this.gssdBatch.setCellValueFactory((Callback)new PropertyValueFactory(this.gssdBatch.getId()));
        this.gssdQty.setCellValueFactory((Callback)new PropertyValueFactory(this.gssdQty.getId()));
    }

    private List<GsdcStatus> getAllStatus() {
        ArrayList<GsdcStatus> list = new ArrayList<GsdcStatus>();
        list.add(new GsdcStatus("1", "\u7537"));
        list.add(new GsdcStatus("2", "\u5973"));
        return list;
    }

    @FXML
    private void uploadAudit() {
        Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", null);
        if (StrUtil.isBlank((CharSequence)this.inpGssrCustName.getText()) || this.inpGssrCustName.getText().length() > 10) {
            alert.setContentText("\u59d3\u540d\u4e0d\u4e3a\u7a7a\u4e14\u957f\u5ea6\u4e0d\u8d85\u8fc710");
            alert.showAndWait();
            return;
        }
        if (StrUtil.isBlank((CharSequence)this.inpGssrCustMobile.getText()) || this.inpGssrCustMobile.getText().length() > 11) {
            alert.setContentText("\u624b\u673a\u4e0d\u4e3a\u7a7a\u4e14\u53f7\u957f\u5ea6\u4e0d\u8d85\u8fc711");
            alert.showAndWait();
            return;
        }
        if (StrUtil.isBlank((CharSequence)this.inpGssrCustAge.getText()) || this.inpGssrCustAge.getText().length() > 2) {
            alert.setContentText("\u5e74\u9f84\u4e0d\u4e3a\u7a7a\u4e14\u957f\u5ea6\u4e0d\u8d85\u8fc72");
            alert.showAndWait();
            return;
        }
        if (StrUtil.isBlank((CharSequence)this.inpGssrCustIdcard.getText()) || this.inpGssrCustIdcard.getText().length() > 18) {
            alert.setContentText("\u8eab\u4efd\u8bc1\u53f7\u4e0d\u4e3a\u7a7a\u4e14\u957f\u5ea6\u4e0d\u8d85\u8fc718");
            alert.showAndWait();
            return;
        }
        RemoteAuditHInData inData = new RemoteAuditHInData();
        inData.setGsrahUploadDate(this.inpGssrDate.getText());
        inData.setGsrahUploadTime(this.inpGssrTime.getText());
        inData.setGsrahCustName(this.inpGssrCustName.getText());
        inData.setGsrahCustAge(this.inpGssrCustAge.getText());
        inData.setGsrahCustSex(((GsdcStatus)this.inpGssrCustSex.getValue()).getCode());
        inData.setGsrahCustIdcard(this.inpGssrCustIdcard.getText());
        inData.setGsrahCustMobile(this.inpGssrCustMobile.getText());
        inData.setGsrahRecipelPicAddress(this.image);
        inData.setGsrahBillNo(this.salesReceiptsMainController.getCaseId().getText());
        ArrayList<RemoteAuditDInData> auditDs = new ArrayList<RemoteAuditDInData>();
        for (GaiaSdSaleRecipelRecordOutData table : this.observableTableList) {
            if (!table.getRecipelRecordOutDataCheckBox().isSelected().booleanValue()) continue;
            RemoteAuditDInData d = new RemoteAuditDInData();
            d.setGsradProId(table.getProCode());
            d.setGsradBatchNo(table.getGssdBatch());
            d.setGsradQty(table.getGssdQty());
            auditDs.add(d);
        }
        if (auditDs.size() == 0) {
            alert.setContentText("\u672a\u9009\u62e9\u5bf9\u5e94\u8bb0\u5f55\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\uff01");
            alert.showAndWait();
            return;
        }
        inData.setAuditDs(auditDs);
        HttpJson httpJson = RemoteAuditUtil.addRemoteAudit(inData);
        if (httpJson.isSuccess()) {
            alert.setContentText("\u4fdd\u5b58\u6210\u529f");
            alert.showAndWait();
            final String tempNum = this.numTh;
            this.closeWindow();
            if (ObjectUtil.isNotEmpty(tempNum) && Integer.valueOf(tempNum) < this.recipelDrugsController.numZhang) {
                Platform.runLater((Runnable)new Runnable(){

                    @Override
                    public void run() {
                        ((RemoteAuditController)RemoteAuditController.this).selectRecipelDrugsController.upPaper = true;
                        ((RemoteAuditController)RemoteAuditController.this).selectRecipelDrugsController.numTh = Integer.valueOf(tempNum) + 1;
                        RemoteAuditController.this.selectRecipelDrugsController.init();
                        GysApplication.showView(SelectRecipelDrugsView.class, (Modality)Modality.APPLICATION_MODAL);
                    }
                });
            }
            return;
        }
        alert.setContentText(httpJson.getMsg());
        alert.showAndWait();
    }

    @FXML
    private void closeWindow() {
        this.numTh = "";
        this.modelPane.getScene().getWindow().hide();
    }

    @FXML
    private void uploadPrescription() {
        Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", null);
        File file = CommonUtil.imageChooser();
        if (ObjectUtil.isEmpty(file)) {
            return;
        }
        String directoryUrl = file.getParent();
        CacheUtil.put("lastPathDirectory", directoryUrl);
        HttpJson httpJson = GysUtil.upload(file);
        if (httpJson.isSuccess()) {
            GetFileOutData fileOutData = (GetFileOutData)JSON.parseObject((String)httpJson.getMsg(), GetFileOutData.class);
            this.image = fileOutData.getPath();
            Image image = new Image(fileOutData.getUrl());
            this.imageUrl.setImage(image);
        } else {
            alert.setContentText(httpJson.getMsg());
            alert.showAndWait();
        }
    }

    @FXML
    private void memberAction() {
        GetQueryMemberOutData memberOutData = (GetQueryMemberOutData)CacheUtil.get("memberOutData");
        if (ObjectUtil.isNotEmpty(memberOutData)) {
            this.inpGssrCustName.setText(memberOutData.getName());
            if ("1".equals(memberOutData.getSex())) {
                this.inpGssrCustSex.setValue(new GsdcStatus("1", "\u7537"));
            } else if ("0".equals(memberOutData.getSex())) {
                this.inpGssrCustSex.setValue(new GsdcStatus("2", "\u5973"));
            }
        } else {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u5f53\u524d\u6ca1\u6709\u4f1a\u5458\u4fe1\u606f");
            alert.showAndWait();
            return;
        }
        this.inpGssrCustMobile.setText(memberOutData.getPhone());
        this.inpGssrCustAge.setText(memberOutData.getAge());
        this.inpGssrCustIdcard.setText(memberOutData.getIdCard());
    }

    private List<Integer> getSelectIndex() {
        ArrayList<Integer> ids = new ArrayList<Integer>();
        if (!CollectionUtils.isEmpty(this.observableTableList)) {
            for (GaiaSdSaleRecipelRecordOutData i : this.observableTableList) {
                if (!i.getRecipelRecordOutDataCheckBox().isSelected().booleanValue()) continue;
                ids.add(i.getIndex());
            }
        }
        return ids;
    }

    public SaleRecipelRecordController getSaleRecipelRecordController() {
        return this.saleRecipelRecordController;
    }

    public ObservableList<GaiaSdSaleRecipelRecordOutData> getObservableTableList() {
        return this.observableTableList;
    }

    public Pane getModelPane() {
        return this.modelPane;
    }

    public Button getUploadAuditBtn() {
        return this.uploadAuditBtn;
    }

    public Button getCancelBtn() {
        return this.cancelBtn;
    }

    public TextField getInpGssrCustName() {
        return this.inpGssrCustName;
    }

    public ComboBox<GsdcStatus> getInpGssrCustSex() {
        return this.inpGssrCustSex;
    }

    public TextField getInpGssrCustMobile() {
        return this.inpGssrCustMobile;
    }

    public TextField getInpGssrCustAge() {
        return this.inpGssrCustAge;
    }

    public TextField getInpGssrCustIdcard() {
        return this.inpGssrCustIdcard;
    }

    public TextField getInpGssrEmp() {
        return this.inpGssrEmp;
    }

    public TextField getInpGssrDate() {
        return this.inpGssrDate;
    }

    public TextField getInpGssrTime() {
        return this.inpGssrTime;
    }

    public ImageView getImgView() {
        return this.imgView;
    }

    public TableColumn<GaiaSdSaleRecipelRecordOutData, String> getIndex() {
        return this.index;
    }

    public TableColumn<GaiaSdSaleRecipelRecordOutData, CheckBox> getRecipelRecordOutDataCheckBox() {
        return this.recipelRecordOutDataCheckBox;
    }

    public TableColumn<GaiaSdSaleRecipelRecordOutData, String> getProCode() {
        return this.proCode;
    }

    public TableColumn<GaiaSdSaleRecipelRecordOutData, String> getProCommonname() {
        return this.proCommonname;
    }

    public TableColumn<GaiaSdSaleRecipelRecordOutData, String> getProSpecs() {
        return this.proSpecs;
    }

    public TableColumn<GaiaSdSaleRecipelRecordOutData, String> getProUnit() {
        return this.proUnit;
    }

    public TableColumn<GaiaSdSaleRecipelRecordOutData, String> getGssdBatch() {
        return this.gssdBatch;
    }

    public TableColumn<GaiaSdSaleRecipelRecordOutData, String> getGssdQty() {
        return this.gssdQty;
    }

    public TableView<GaiaSdSaleRecipelRecordOutData> getTableView() {
        return this.tableView;
    }

    public ImageView getImageUrl() {
        return this.imageUrl;
    }

    public IndexController getIndexController() {
        return this.indexController;
    }

    public SelectRecipelDrugsController getSelectRecipelDrugsController() {
        return this.selectRecipelDrugsController;
    }

    public SalesReceiptsMainController getSalesReceiptsMainController() {
        return this.salesReceiptsMainController;
    }

    public RecipelDrugsController getRecipelDrugsController() {
        return this.recipelDrugsController;
    }

    public List<GaiaSdSaleRecipelRecordOutData> getDataList() {
        return this.dataList;
    }

    public String getNumTh() {
        return this.numTh;
    }

    public String getImage() {
        return this.image;
    }

    public void setSaleRecipelRecordController(SaleRecipelRecordController saleRecipelRecordController) {
        this.saleRecipelRecordController = saleRecipelRecordController;
    }

    public void setObservableTableList(ObservableList<GaiaSdSaleRecipelRecordOutData> observableTableList) {
        this.observableTableList = observableTableList;
    }

    public void setModelPane(Pane modelPane) {
        this.modelPane = modelPane;
    }

    public void setUploadAuditBtn(Button uploadAuditBtn) {
        this.uploadAuditBtn = uploadAuditBtn;
    }

    public void setCancelBtn(Button cancelBtn) {
        this.cancelBtn = cancelBtn;
    }

    public void setInpGssrCustName(TextField inpGssrCustName) {
        this.inpGssrCustName = inpGssrCustName;
    }

    public void setInpGssrCustSex(ComboBox<GsdcStatus> inpGssrCustSex) {
        this.inpGssrCustSex = inpGssrCustSex;
    }

    public void setInpGssrCustMobile(TextField inpGssrCustMobile) {
        this.inpGssrCustMobile = inpGssrCustMobile;
    }

    public void setInpGssrCustAge(TextField inpGssrCustAge) {
        this.inpGssrCustAge = inpGssrCustAge;
    }

    public void setInpGssrCustIdcard(TextField inpGssrCustIdcard) {
        this.inpGssrCustIdcard = inpGssrCustIdcard;
    }

    public void setInpGssrEmp(TextField inpGssrEmp) {
        this.inpGssrEmp = inpGssrEmp;
    }

    public void setInpGssrDate(TextField inpGssrDate) {
        this.inpGssrDate = inpGssrDate;
    }

    public void setInpGssrTime(TextField inpGssrTime) {
        this.inpGssrTime = inpGssrTime;
    }

    public void setImgView(ImageView imgView) {
        this.imgView = imgView;
    }

    public void setIndex(TableColumn<GaiaSdSaleRecipelRecordOutData, String> index) {
        this.index = index;
    }

    public void setRecipelRecordOutDataCheckBox(TableColumn<GaiaSdSaleRecipelRecordOutData, CheckBox> recipelRecordOutDataCheckBox) {
        this.recipelRecordOutDataCheckBox = recipelRecordOutDataCheckBox;
    }

    public void setProCode(TableColumn<GaiaSdSaleRecipelRecordOutData, String> proCode) {
        this.proCode = proCode;
    }

    public void setProCommonname(TableColumn<GaiaSdSaleRecipelRecordOutData, String> proCommonname) {
        this.proCommonname = proCommonname;
    }

    public void setProSpecs(TableColumn<GaiaSdSaleRecipelRecordOutData, String> proSpecs) {
        this.proSpecs = proSpecs;
    }

    public void setProUnit(TableColumn<GaiaSdSaleRecipelRecordOutData, String> proUnit) {
        this.proUnit = proUnit;
    }

    public void setGssdBatch(TableColumn<GaiaSdSaleRecipelRecordOutData, String> gssdBatch) {
        this.gssdBatch = gssdBatch;
    }

    public void setGssdQty(TableColumn<GaiaSdSaleRecipelRecordOutData, String> gssdQty) {
        this.gssdQty = gssdQty;
    }

    public void setTableView(TableView<GaiaSdSaleRecipelRecordOutData> tableView) {
        this.tableView = tableView;
    }

    public void setImageUrl(ImageView imageUrl) {
        this.imageUrl = imageUrl;
    }

    public void setIndexController(IndexController indexController) {
        this.indexController = indexController;
    }

    public void setSelectRecipelDrugsController(SelectRecipelDrugsController selectRecipelDrugsController) {
        this.selectRecipelDrugsController = selectRecipelDrugsController;
    }

    public void setSalesReceiptsMainController(SalesReceiptsMainController salesReceiptsMainController) {
        this.salesReceiptsMainController = salesReceiptsMainController;
    }

    public void setRecipelDrugsController(RecipelDrugsController recipelDrugsController) {
        this.recipelDrugsController = recipelDrugsController;
    }

    public void setDataList(List<GaiaSdSaleRecipelRecordOutData> dataList) {
        this.dataList = dataList;
    }

    public void setNumTh(String numTh) {
        this.numTh = numTh;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof RemoteAuditController)) {
            return false;
        }
        RemoteAuditController other = (RemoteAuditController)o;
        if (!other.canEqual(this)) {
            return false;
        }
        SaleRecipelRecordController this$saleRecipelRecordController = this.getSaleRecipelRecordController();
        SaleRecipelRecordController other$saleRecipelRecordController = other.getSaleRecipelRecordController();
        if (this$saleRecipelRecordController == null ? other$saleRecipelRecordController != null : !(this$saleRecipelRecordController).equals(other$saleRecipelRecordController)) {
            return false;
        }
        ObservableList<GaiaSdSaleRecipelRecordOutData> this$observableTableList = this.getObservableTableList();
        ObservableList<GaiaSdSaleRecipelRecordOutData> other$observableTableList = other.getObservableTableList();
        if (this$observableTableList == null ? other$observableTableList != null : !this$observableTableList.equals(other$observableTableList)) {
            return false;
        }
        Pane this$modelPane = this.getModelPane();
        Pane other$modelPane = other.getModelPane();
        if (this$modelPane == null ? other$modelPane != null : !this$modelPane.equals(other$modelPane)) {
            return false;
        }
        Button this$uploadAuditBtn = this.getUploadAuditBtn();
        Button other$uploadAuditBtn = other.getUploadAuditBtn();
        if (this$uploadAuditBtn == null ? other$uploadAuditBtn != null : !this$uploadAuditBtn.equals(other$uploadAuditBtn)) {
            return false;
        }
        Button this$cancelBtn = this.getCancelBtn();
        Button other$cancelBtn = other.getCancelBtn();
        if (this$cancelBtn == null ? other$cancelBtn != null : !this$cancelBtn.equals(other$cancelBtn)) {
            return false;
        }
        TextField this$inpGssrCustName = this.getInpGssrCustName();
        TextField other$inpGssrCustName = other.getInpGssrCustName();
        if (this$inpGssrCustName == null ? other$inpGssrCustName != null : !this$inpGssrCustName.equals(other$inpGssrCustName)) {
            return false;
        }
        ComboBox<GsdcStatus> this$inpGssrCustSex = this.getInpGssrCustSex();
        ComboBox<GsdcStatus> other$inpGssrCustSex = other.getInpGssrCustSex();
        if (this$inpGssrCustSex == null ? other$inpGssrCustSex != null : !this$inpGssrCustSex.equals(other$inpGssrCustSex)) {
            return false;
        }
        TextField this$inpGssrCustMobile = this.getInpGssrCustMobile();
        TextField other$inpGssrCustMobile = other.getInpGssrCustMobile();
        if (this$inpGssrCustMobile == null ? other$inpGssrCustMobile != null : !this$inpGssrCustMobile.equals(other$inpGssrCustMobile)) {
            return false;
        }
        TextField this$inpGssrCustAge = this.getInpGssrCustAge();
        TextField other$inpGssrCustAge = other.getInpGssrCustAge();
        if (this$inpGssrCustAge == null ? other$inpGssrCustAge != null : !this$inpGssrCustAge.equals(other$inpGssrCustAge)) {
            return false;
        }
        TextField this$inpGssrCustIdcard = this.getInpGssrCustIdcard();
        TextField other$inpGssrCustIdcard = other.getInpGssrCustIdcard();
        if (this$inpGssrCustIdcard == null ? other$inpGssrCustIdcard != null : !this$inpGssrCustIdcard.equals(other$inpGssrCustIdcard)) {
            return false;
        }
        TextField this$inpGssrEmp = this.getInpGssrEmp();
        TextField other$inpGssrEmp = other.getInpGssrEmp();
        if (this$inpGssrEmp == null ? other$inpGssrEmp != null : !this$inpGssrEmp.equals(other$inpGssrEmp)) {
            return false;
        }
        TextField this$inpGssrDate = this.getInpGssrDate();
        TextField other$inpGssrDate = other.getInpGssrDate();
        if (this$inpGssrDate == null ? other$inpGssrDate != null : !this$inpGssrDate.equals(other$inpGssrDate)) {
            return false;
        }
        TextField this$inpGssrTime = this.getInpGssrTime();
        TextField other$inpGssrTime = other.getInpGssrTime();
        if (this$inpGssrTime == null ? other$inpGssrTime != null : !this$inpGssrTime.equals(other$inpGssrTime)) {
            return false;
        }
        ImageView this$imgView = this.getImgView();
        ImageView other$imgView = other.getImgView();
        if (this$imgView == null ? other$imgView != null : !this$imgView.equals(other$imgView)) {
            return false;
        }
        TableColumn<GaiaSdSaleRecipelRecordOutData, String> this$index = this.getIndex();
        TableColumn<GaiaSdSaleRecipelRecordOutData, String> other$index = other.getIndex();
        if (this$index == null ? other$index != null : !this$index.equals(other$index)) {
            return false;
        }
        TableColumn<GaiaSdSaleRecipelRecordOutData, CheckBox> this$recipelRecordOutDataCheckBox = this.getRecipelRecordOutDataCheckBox();
        TableColumn<GaiaSdSaleRecipelRecordOutData, CheckBox> other$recipelRecordOutDataCheckBox = other.getRecipelRecordOutDataCheckBox();
        if (this$recipelRecordOutDataCheckBox == null ? other$recipelRecordOutDataCheckBox != null : !this$recipelRecordOutDataCheckBox.equals(other$recipelRecordOutDataCheckBox)) {
            return false;
        }
        TableColumn<GaiaSdSaleRecipelRecordOutData, String> this$proCode = this.getProCode();
        TableColumn<GaiaSdSaleRecipelRecordOutData, String> other$proCode = other.getProCode();
        if (this$proCode == null ? other$proCode != null : !this$proCode.equals(other$proCode)) {
            return false;
        }
        TableColumn<GaiaSdSaleRecipelRecordOutData, String> this$proCommonname = this.getProCommonname();
        TableColumn<GaiaSdSaleRecipelRecordOutData, String> other$proCommonname = other.getProCommonname();
        if (this$proCommonname == null ? other$proCommonname != null : !this$proCommonname.equals(other$proCommonname)) {
            return false;
        }
        TableColumn<GaiaSdSaleRecipelRecordOutData, String> this$proSpecs = this.getProSpecs();
        TableColumn<GaiaSdSaleRecipelRecordOutData, String> other$proSpecs = other.getProSpecs();
        if (this$proSpecs == null ? other$proSpecs != null : !this$proSpecs.equals(other$proSpecs)) {
            return false;
        }
        TableColumn<GaiaSdSaleRecipelRecordOutData, String> this$proUnit = this.getProUnit();
        TableColumn<GaiaSdSaleRecipelRecordOutData, String> other$proUnit = other.getProUnit();
        if (this$proUnit == null ? other$proUnit != null : !this$proUnit.equals(other$proUnit)) {
            return false;
        }
        TableColumn<GaiaSdSaleRecipelRecordOutData, String> this$gssdBatch = this.getGssdBatch();
        TableColumn<GaiaSdSaleRecipelRecordOutData, String> other$gssdBatch = other.getGssdBatch();
        if (this$gssdBatch == null ? other$gssdBatch != null : !this$gssdBatch.equals(other$gssdBatch)) {
            return false;
        }
        TableColumn<GaiaSdSaleRecipelRecordOutData, String> this$gssdQty = this.getGssdQty();
        TableColumn<GaiaSdSaleRecipelRecordOutData, String> other$gssdQty = other.getGssdQty();
        if (this$gssdQty == null ? other$gssdQty != null : !this$gssdQty.equals(other$gssdQty)) {
            return false;
        }
        TableView<GaiaSdSaleRecipelRecordOutData> this$tableView = this.getTableView();
        TableView<GaiaSdSaleRecipelRecordOutData> other$tableView = other.getTableView();
        if (this$tableView == null ? other$tableView != null : !this$tableView.equals(other$tableView)) {
            return false;
        }
        ImageView this$imageUrl = this.getImageUrl();
        ImageView other$imageUrl = other.getImageUrl();
        if (this$imageUrl == null ? other$imageUrl != null : !this$imageUrl.equals(other$imageUrl)) {
            return false;
        }
        IndexController this$indexController = this.getIndexController();
        IndexController other$indexController = other.getIndexController();
        if (this$indexController == null ? other$indexController != null : !(this$indexController).equals(other$indexController)) {
            return false;
        }
        SelectRecipelDrugsController this$selectRecipelDrugsController = this.getSelectRecipelDrugsController();
        SelectRecipelDrugsController other$selectRecipelDrugsController = other.getSelectRecipelDrugsController();
        if (this$selectRecipelDrugsController == null ? other$selectRecipelDrugsController != null : !(this$selectRecipelDrugsController).equals(other$selectRecipelDrugsController)) {
            return false;
        }
        SalesReceiptsMainController this$salesReceiptsMainController = this.getSalesReceiptsMainController();
        SalesReceiptsMainController other$salesReceiptsMainController = other.getSalesReceiptsMainController();
        if (this$salesReceiptsMainController == null ? other$salesReceiptsMainController != null : !(this$salesReceiptsMainController).equals(other$salesReceiptsMainController)) {
            return false;
        }
        RecipelDrugsController this$recipelDrugsController = this.getRecipelDrugsController();
        RecipelDrugsController other$recipelDrugsController = other.getRecipelDrugsController();
        if (this$recipelDrugsController == null ? other$recipelDrugsController != null : !this$recipelDrugsController.equals(other$recipelDrugsController)) {
            return false;
        }
        List<GaiaSdSaleRecipelRecordOutData> this$dataList = this.getDataList();
        List<GaiaSdSaleRecipelRecordOutData> other$dataList = other.getDataList();
        if (this$dataList == null ? other$dataList != null : !(this$dataList).equals(other$dataList)) {
            return false;
        }
        String this$numTh = this.getNumTh();
        String other$numTh = other.getNumTh();
        if (this$numTh == null ? other$numTh != null : !this$numTh.equals(other$numTh)) {
            return false;
        }
        String this$image = this.getImage();
        String other$image = other.getImage();
        return !(this$image == null ? other$image != null : !this$image.equals(other$image));
    }

    protected boolean canEqual(Object other) {
        return other instanceof RemoteAuditController;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        SaleRecipelRecordController $saleRecipelRecordController = this.getSaleRecipelRecordController();
        result = result * 59 + ($saleRecipelRecordController == null ? 43 : ($saleRecipelRecordController).hashCode());
        ObservableList<GaiaSdSaleRecipelRecordOutData> $observableTableList = this.getObservableTableList();
        result = result * 59 + ($observableTableList == null ? 43 : $observableTableList.hashCode());
        Pane $modelPane = this.getModelPane();
        result = result * 59 + ($modelPane == null ? 43 : $modelPane.hashCode());
        Button $uploadAuditBtn = this.getUploadAuditBtn();
        result = result * 59 + ($uploadAuditBtn == null ? 43 : $uploadAuditBtn.hashCode());
        Button $cancelBtn = this.getCancelBtn();
        result = result * 59 + ($cancelBtn == null ? 43 : $cancelBtn.hashCode());
        TextField $inpGssrCustName = this.getInpGssrCustName();
        result = result * 59 + ($inpGssrCustName == null ? 43 : $inpGssrCustName.hashCode());
        ComboBox<GsdcStatus> $inpGssrCustSex = this.getInpGssrCustSex();
        result = result * 59 + ($inpGssrCustSex == null ? 43 : $inpGssrCustSex.hashCode());
        TextField $inpGssrCustMobile = this.getInpGssrCustMobile();
        result = result * 59 + ($inpGssrCustMobile == null ? 43 : $inpGssrCustMobile.hashCode());
        TextField $inpGssrCustAge = this.getInpGssrCustAge();
        result = result * 59 + ($inpGssrCustAge == null ? 43 : $inpGssrCustAge.hashCode());
        TextField $inpGssrCustIdcard = this.getInpGssrCustIdcard();
        result = result * 59 + ($inpGssrCustIdcard == null ? 43 : $inpGssrCustIdcard.hashCode());
        TextField $inpGssrEmp = this.getInpGssrEmp();
        result = result * 59 + ($inpGssrEmp == null ? 43 : $inpGssrEmp.hashCode());
        TextField $inpGssrDate = this.getInpGssrDate();
        result = result * 59 + ($inpGssrDate == null ? 43 : $inpGssrDate.hashCode());
        TextField $inpGssrTime = this.getInpGssrTime();
        result = result * 59 + ($inpGssrTime == null ? 43 : $inpGssrTime.hashCode());
        ImageView $imgView = this.getImgView();
        result = result * 59 + ($imgView == null ? 43 : $imgView.hashCode());
        TableColumn<GaiaSdSaleRecipelRecordOutData, String> $index = this.getIndex();
        result = result * 59 + ($index == null ? 43 : $index.hashCode());
        TableColumn<GaiaSdSaleRecipelRecordOutData, CheckBox> $recipelRecordOutDataCheckBox = this.getRecipelRecordOutDataCheckBox();
        result = result * 59 + ($recipelRecordOutDataCheckBox == null ? 43 : $recipelRecordOutDataCheckBox.hashCode());
        TableColumn<GaiaSdSaleRecipelRecordOutData, String> $proCode = this.getProCode();
        result = result * 59 + ($proCode == null ? 43 : $proCode.hashCode());
        TableColumn<GaiaSdSaleRecipelRecordOutData, String> $proCommonname = this.getProCommonname();
        result = result * 59 + ($proCommonname == null ? 43 : $proCommonname.hashCode());
        TableColumn<GaiaSdSaleRecipelRecordOutData, String> $proSpecs = this.getProSpecs();
        result = result * 59 + ($proSpecs == null ? 43 : $proSpecs.hashCode());
        TableColumn<GaiaSdSaleRecipelRecordOutData, String> $proUnit = this.getProUnit();
        result = result * 59 + ($proUnit == null ? 43 : $proUnit.hashCode());
        TableColumn<GaiaSdSaleRecipelRecordOutData, String> $gssdBatch = this.getGssdBatch();
        result = result * 59 + ($gssdBatch == null ? 43 : $gssdBatch.hashCode());
        TableColumn<GaiaSdSaleRecipelRecordOutData, String> $gssdQty = this.getGssdQty();
        result = result * 59 + ($gssdQty == null ? 43 : $gssdQty.hashCode());
        TableView<GaiaSdSaleRecipelRecordOutData> $tableView = this.getTableView();
        result = result * 59 + ($tableView == null ? 43 : $tableView.hashCode());
        ImageView $imageUrl = this.getImageUrl();
        result = result * 59 + ($imageUrl == null ? 43 : $imageUrl.hashCode());
        IndexController $indexController = this.getIndexController();
        result = result * 59 + ($indexController == null ? 43 : ($indexController).hashCode());
        SelectRecipelDrugsController $selectRecipelDrugsController = this.getSelectRecipelDrugsController();
        result = result * 59 + ($selectRecipelDrugsController == null ? 43 : ($selectRecipelDrugsController).hashCode());
        SalesReceiptsMainController $salesReceiptsMainController = this.getSalesReceiptsMainController();
        result = result * 59 + ($salesReceiptsMainController == null ? 43 : ($salesReceiptsMainController).hashCode());
        RecipelDrugsController $recipelDrugsController = this.getRecipelDrugsController();
        result = result * 59 + ($recipelDrugsController == null ? 43 : $recipelDrugsController.hashCode());
        List<GaiaSdSaleRecipelRecordOutData> $dataList = this.getDataList();
        result = result * 59 + ($dataList == null ? 43 : ($dataList).hashCode());
        String $numTh = this.getNumTh();
        result = result * 59 + ($numTh == null ? 43 : $numTh.hashCode());
        String $image = this.getImage();
        result = result * 59 + ($image == null ? 43 : $image.hashCode());
        return result;
    }

    public String toString() {
        return "RemoteAuditController(saleRecipelRecordController=" + this.getSaleRecipelRecordController() + ", observableTableList=" + this.getObservableTableList() + ", modelPane=" + this.getModelPane() + ", uploadAuditBtn=" + this.getUploadAuditBtn() + ", cancelBtn=" + this.getCancelBtn() + ", inpGssrCustName=" + this.getInpGssrCustName() + ", inpGssrCustSex=" + this.getInpGssrCustSex() + ", inpGssrCustMobile=" + this.getInpGssrCustMobile() + ", inpGssrCustAge=" + this.getInpGssrCustAge() + ", inpGssrCustIdcard=" + this.getInpGssrCustIdcard() + ", inpGssrEmp=" + this.getInpGssrEmp() + ", inpGssrDate=" + this.getInpGssrDate() + ", inpGssrTime=" + this.getInpGssrTime() + ", imgView=" + this.getImgView() + ", index=" + this.getIndex() + ", recipelRecordOutDataCheckBox=" + this.getRecipelRecordOutDataCheckBox() + ", proCode=" + this.getProCode() + ", proCommonname=" + this.getProCommonname() + ", proSpecs=" + this.getProSpecs() + ", proUnit=" + this.getProUnit() + ", gssdBatch=" + this.getGssdBatch() + ", gssdQty=" + this.getGssdQty() + ", tableView=" + this.getTableView() + ", imageUrl=" + this.getImageUrl() + ", indexController=" + this.getIndexController() + ", selectRecipelDrugsController=" + this.getSelectRecipelDrugsController() + ", salesReceiptsMainController=" + this.getSalesReceiptsMainController() + ", recipelDrugsController=" + this.getRecipelDrugsController() + ", dataList=" + this.getDataList() + ", numTh=" + this.getNumTh() + ", image=" + this.getImage() + ")";
    }
}

